<?php
namespace Tbf\Error;
use Tbf\Util\ErrorUtil;
/**
 * @deprecated
 */
class ErrorException extends Exception{
    protected $level_code;
    protected $level_string;
    protected $origin_message;
    function __construct($info=null){
        if ($info===null){
            return;
        }
        $this->level_code = $info['level_code'];
        $this->level_string = ErrorUtil::levelCodeToString($this->level_code);
        $this->origin_message = $info['message'];
        $this->file = $info['file'];
        $this->line = $info['line'];
        $this->message = 'Php error happend!! '.$this->level_string."\n".
            $this->origin_message."\n";
    }
    function getLevelCode(){
        return $this->level_code;
    }
    function getLevelString(){
        return $this->level_string;
    }
    function getOriginMessage(){
        return $this->origin_message;
    }
} 
